package com.jwthhealth_pub.old.sportfitness.presenter;

import com.jwthhealth_pub.old.sportfitness.module.SprotCourseInfoModule;
import com.jwthhealth_pub.old.sportfitness.view.SportCourseListActivity;

import java.util.List;

/**
 * Created by Administrator on 2017/1/6.
 */

public class ISportCourseInfoListPresenterCompl implements ISportCourseInfoListPresenter {

    private SportCourseListActivity activity;
    private List<SprotCourseInfoModule.DataBean.VideoListBean> list;

    public ISportCourseInfoListPresenterCompl(SportCourseListActivity activity) {
        this.activity = activity;
    }

    public ISportCourseInfoListPresenterCompl(SportCourseListActivity sportCourseListActivity, List<SprotCourseInfoModule.DataBean.VideoListBean> video_list) {
        this.activity = activity;
        this.list = video_list;

    }

    @Override
    public int left(int index) {
        if (index > 0) {
            index --;
        }
        return index;
    }

    @Override
    public int right(int index) {
        if (index < list.size()-1) {
            index ++;
        }
        return index;
    }
}
